import * as ActionTypes from './ActionTypes';

export const menuItemChange = key => {
  return {
    type: ActionTypes.menuItemChange,
    key: key
  };
};

export const subMenuItemChange = key => {
  return {
    type: ActionTypes.subMenuItemChange,
    key: key
  };
};

// 用户信息发生变化
export const updateUserInfo = ({ type, data }) => {
  return {
    type: ActionTypes.user__infoUpdate,
    data: { ...data }
  };
};
export const userlogout = ({ type, data }) => {
  return {
    type: ActionTypes.user__logout,
    data: { ...data }
  };
};
// 当 用户界面的尺寸发生变化时调用
export const updateUiSize = ({ type, data }) => {
  return {
    type: ActionTypes.ui__update,
    data: { ...data }
  };
};
